package com.qf.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qf.common.annotation.Excel;
import com.qf.common.core.domain.BaseEntity;

/**
 * 考勤对象 sys_attendance
 * 
 * @author ruoyi
 * @date 2025-11-01
 */
@Data
public class SysAttendance extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 考勤ID */
    private Long id;

    /** 上午打卡时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @Excel(name = "上午打卡时间", width = 30, dateFormat = "HH:mm:ss")
    private Date morning;

    /** 下午打卡时间 */
    @JsonFormat(pattern = "HH:mm:ss")
    @Excel(name = "下午打卡时间", width = 30, dateFormat = "HH:mm:ss")
    private Date afternoon;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;


    @Excel(name = "用户名称")
    private String userName;

    /** 状态标签（非数据库字段，用于前端显示，如“正常”“迟到”） */
    private String statusLabel;

    /** 打卡日期 */
    private Date checkDate;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("morning", getMorning())
            .append("afternoon", getAfternoon())
            .append("status", getStatus())
            .append("userId", getUserId())
            .append("checkDate", getCheckDate())
            .toString();
    }
}
